<link href="http://<?= $_SERVER['HTTP_HOST'] ?>/salusme/include/css/fal_style.css" rel="stylesheet" type="text/css" />
        <script src="http://<?= $_SERVER['HTTP_HOST'] ?>/salusme/include/js/jquery.js" type="text/javascript"></script>
        <script src="http://<?= $_SERVER['HTTP_HOST'] ?>/salusme/include/js/flash.js" type="text/javascript"></script>
        <script src="http://<?= $_SERVER['HTTP_HOST'] ?>/salusme/include/js/jquery-1.2.6.min.js" type="text/javascript"></script>
<?php

/*
 * This is final page for registration.
 */
include '../config.php';
$_COOKIE['cde'];
session_start();
$purchase = $_POST['purchase'];
$pro_id = $_POST['pro_id'];
if($pro_id=='1'){
    $pro_name = 'SalusMe';
    $img = 'http://'.$_SERVER['HTTP_HOST'].'/salusme/include/images/products/1.png';
}elseif($pro_id=='2'){
  $pro_name= 'SalusBaby';
    $img = 'http://'.$_SERVER['HTTP_HOST'].'/salusme/include/images/products/2.png';
}
$type = $_POST['type'];
$comp_id = $_POST['company_id'];

if($type=='direct'){
    $pid = mysql_query("select id  from salus_buy_detail where FK_fa_product_id=$pro_id and product_prize=$purchase ") or die(mysql_error());
    while ($row = mysql_fetch_array($pid)) {
        $pro_detail_id = $row['id'];        
        
    }
}else{
    $pro_detail_id = $_POST['pro_detail_id'];
}


 session_start();
    $paypal_page = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
    $seller_id = 'sjk.fr_1346599808_biz@gmail.com';   
    $_SESSION['amount'] = $purchase;
    $_SESSION['pro_detail_id'] = $pro_detail_id;
    $return_address = 'http://'.$_SERVER['HTTP_HOST'].'/salusmain/join/success.php';
    $return_cancle = 'http://'.$_SERVER['HTTP_HOST'].'/salusmain/join/cancle.php';

?>
<body>
        <div id="wrapper">
            <div id="header_small" ></div>
            <center>
                <b>Welcome <?= $_SESSION['user_name'] ?>....!!!</b><br/><br/><br/><br/>
                <img src="<?=$img?>" height="60" />
                <form action=<?= $paypal_page ?> method="post" >
                    <input type= "hidden" name="cmd" value = "_xclick" />
                    <input type="hidden" name="business" value="<?= $seller_id ?>" />
                    <input type="hidden" name="item_name" value="<?=$pro_name?>" />
                    <input type="hidden" name="item_number" value="<?=$pro_id?>" />
                    <input type="hidden" name="buy_detail_id" value="<?=$pro_detail_id?>" />
                    <input type="hidden" name="amount" value="<?= $purchase ?>" />
                    <input type="hidden" name="no_shipping" value="1" />
                    <input type="hidden" name="no_note" value="1" />
                    <input type="hidden" name="currency_code" value="EUR" />
                    <input type="hidden" name="bn" value="PP-BuyNowBF" />
                    <input type='hidden' name='return' value="<?= $return_address ?>" />
                    <input type='hidden' name='cancel_return' value="<?= $return_cancle ?>" />                    
                    <input type="image" src="../button_07.gif" name="submit" />
                </form>

                <br/><br/><br/>
            </center>
                
               
        </div>
    </body>